package com.wceManage.commons.util;

import java.io.InputStream;
import java.io.InputStreamReader;
import java.util.Properties;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/**
 * 获取配置文件
 * @author huangheng
 *
 */
public class ConfigPropKit {

	public static Properties pro = new Properties();
	
	private static Logger logger = LoggerFactory.getLogger(ConfigPropKit.class);
	
	static{
		try {
			InputStream in = ConfigPropKit.class.getClassLoader().getResourceAsStream("/config-com.properties");
			InputStreamReader inputStreamReader = new InputStreamReader(in, "UTF-8");
			pro.load(inputStreamReader);
			in.close();
		} catch (Exception e) {
			logger.error("获取配置出错");
			e.printStackTrace();
		}
	}
	public static String get(String name){
		return pro.get(name).toString();	
	}
}
